package org.agile4j.patterns.command.macros;

public class Client {
	public static void main(String[] args) {
		// 先要启动后台, 让整个程序运行起来
		CookManager.runCookManager();
		
		// 为了简单, 直接用循环模拟多个桌号点菜
		for (int x = 0; x < 10; x++) {
			// 创建服务员
			Waiter waiter = new Waiter() ;
			// 创建命令对象, 就是要点的菜
			Command chop = new ChopCommand(x) ;
			Command duck = new DuckCommand(x) ;
			
			// 点菜, 就是把这些菜让服务员记下来
			waiter.orderDish(chop);
			waiter.orderDish(duck);
			
			// 点菜完毕
			waiter.orderOver();
		}
		
	}
	
	/**
		// 客户只是赋值想服务员点菜就好了
		// 创建服务员
		Waiter waiter = new Waiter() ;
		
		// 创建命令对象, 就是要点的菜
		Command chop = new ChopCommand() ;
		Command duck = new DuckCommand() ;
		Command pork = new PorkCommand() ;
		
		// 点菜, 就是把这些菜让服务员记下来
		waiter.orderDish(pork);
		waiter.orderDish(duck);
		waiter.orderDish(chop);
		
		// 点菜完毕
		waiter.orderOver();
	 */
}
